import request from '../utils/request.js'
import {
	formDataString
} from '../utils/tools.js'

export const saveRepairOrderUrl = `/hr/gongdan/saveHrGongdanRepair`

export const saveRepairOrder = function(data) {
	return request({
		url: '/hr/gongdan/saveHrGongdanRepair',
		method: 'POST',
		header: {
			'content-type': 'multipart/form-data; boundary=XXX'
		},
		data: formDataString(data)
	})
}

export const saveCompetitiveUrl = `/competitive/saveCompetitive`

export const saveCompetitive = function(data) {
	return request({
		url: '/competitive/saveCompetitive',
		method: 'POST',
		header: {
			'content-type': 'multipart/form-data; boundary=XXX'
		},
		data: formDataString(data)
	})
}

export const saveNewProductUrl = `/competitive/saveCompetitiveNews`

export const saveNewProduct = function(data) {
	return request({
		url: '/competitive/saveCompetitiveNews',
		method: 'POST',
		header: {
			'content-type': 'multipart/form-data; boundary=XXX'
		},
		data: formDataString(data)
	})
}
